{extend name="public:_base" /}
{block name="main"}
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 栏目管理 <span
        class="c-gray en">&gt;</span> 栏目列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                                              href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>

<div class="page-container">

    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
        <a class="btn btn-primary radius" onclick="edit('添加模块','{:url('Nav/edit',['type'=>'model'])}')" href="javascript:;">
        <i class="Hui-iconfont">&#xe600;</i> 添加栏目</a>
        <a class="btn btn-primary radius" onclick="edit('添加单页面','{:url('Nav/edit',['type'=>'one'])}')" href="javascript:;">
        <i class="Hui-iconfont">&#xe600;</i> 添加单页面</a>
            <a class="btn btn-primary radius" onclick="edit('添加外部链接','{:url('Nav/edit',['type'=>'link'])}')" href="javascript:;">
        <i class="Hui-iconfont">&#xe600;</i> 添加外部链接</a>

        </span>


        </span> <span class="r">共有数据：<strong>{$num}</strong> 条</span>
    </div>

    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">
                <th width="10"><input name="" type="checkbox" value=""></th>
                <th width="300">名称</th>
                <th width="70">类型</th>
                <th width="10">排序</th>
                <th width="100">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="list" id="vo" empty="
            <tr>
                <td colspan='100'>暂无数据</td>
            </tr>
            "}
            <tr class="text-c va-m">
                <td><input name="id" type="checkbox" value="{$vo.id}"></td>
                <td class="text-l">
                    {$vo.level}{$vo.name}
                </td>
                <th><a class="{$vo.type}">错误</a></th>

                <td>
                    {$vo.sort|sortby=$vo.id}
                </td>
                <td class="td-manage">
                    <!--{:url(\''.$vo.model.'/index',['id'=>$vo.id])}-->

                    {switch name="vo.type"}
                    {case value="model"}
                    <a style="text-decoration:none" class="btn btn-xs btn-success"
                       onClick="edit('发布/查看-{$vo.name}','{:url(\''.$vo.model.'/index',['cid'=>$vo.id])}','10001')"
                       href="javascript:;"
                       title="查看/发布">查看/发布</a>
                    {/case}
                    {case value="one"}
                    <a style="text-decoration:none" class="btn btn-xs btn-disabled"
                       href="" target="_blank"
                       title="查看">查看</a>
                    {/case}
                    {default /}
                    <a style="text-decoration:none" class="btn btn-xs btn-disabled"
                       href="{$vo.link}" target="_blank"
                       title="查看">查看</a>
                    {/switch}
                    <a style="text-decoration:none" class="btn btn-xs btn-warning"
                       onClick="edit('{$vo.name}编辑','{:url('Nav/edit',['type'=>$vo.type,'id'=>$vo.id])}','10001')" href="javascript:;"
                       title="编辑">编辑</a>
                    <a style="text-decoration:none" class="btn btn-xs btn-danger"
                       onClick="del(this,'{:url('Nav/del',['id'=>$vo.id])}','10001')" href="javascript:;"
                       title="删除">删除</a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div>
</div>
</div>

{/block}
{block name="js"}
<script type="text/javascript">
    $(".model").html("模块");
    $(".one").html("<font color=\"#FF0000\">单页面</font>");
    $(".link").html("<font color=\"#FF0000\">外部链接</font>");
</script>
{/block}